package edu.hsbremen.teamscore.model;

public class Game {
	
	public enum GameType {
		/* Hier muss die gleiche Reihenfolge stehen,
		 * wie im games_array in der strings.xml, dann
		 * klappt auch der Transform von String nach Enum
		 */
		FOOTBALL	("football"),
		BASKETBALL	("basketball"),
		SOCCER		("soccer"),
		TENNIS 		("tennis"),
		VOLLEYBALL	("volleyball"),
		FLOORBALL	("floorball");
				
		private final String _name;
		
		private GameType(String name) {
			this._name = name;
		}
		
		public String toString() {
			return _name;
		}
				
		public static String[] toArray() {
			String[] result = new String[GameType.values().length];
			
			for (int i = 0; i < GameType.values().length; i++) {
				result[i] = GameType.values()[i].toString();
			}
			
			return result;
		}
	}
	
	private String _name;
	
	public Game() {
		_name = "";
	}
	
	public Game(String name) {
		_name = name;
	}

	public String getName() {
		return _name;
	}

	public void setName(String _name) {
		this._name = _name;
	}

}
